package com.miaoji.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.miaoji.domain.po.OrderInfo;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
    @Select("select * from order_info")
    List<OrderInfo> selectOrderInfo();
    @Update("update order_info set order_state=#{state} where order_id=#{order_id}")
    int updateOrderState(int order_id,int state);
    @Update("update order_info set logistics_company=#{logisticsCompany},logistics_infomation=#{logisticsInfomation} where order_id=#{orderId}")
    int updateOrderDeliverDetail(int orderId, String logisticsCompany, String logisticsInfomation);
    @Update("update order_info set order_state=-1 where id=#{id}")
    int deleteOrderInfo(int id);

    @Update("update order_info set order_state=10 where order_id=#{orderId}")
    int orderRefund(int orderId);
}
